package service.impl;

import dao.AddressDao;
import dao.impl.AddressDaoImpl;
import entity.Address;
import entity.User;
import service.AddressService;

import java.util.List;

public class AddressServiceImpl implements AddressService {
    private static AddressDao addressDao = new AddressDaoImpl(Address.class);
    @Override
    public Address getById(String id) {
        return addressDao.getById(id);
    }

    @Override
    public List<Address> list() {
        return addressDao.list();
    }

    @Override
    public void update(Address address) {
        addressDao.updateById(address);
    }

    @Override
    public void remove(Address address) {
        addressDao.deleteById(address);
    }
}
